memberName = "800901"
appkey = "jackyun_web_browser_2024"
secret1 = "72EyvujHoQWmjfKqsl168SaVycZARQvt"
corpid = "ww89944e61e3e02d29"

# 全局变量缓存
cache = {"access_token": None, "expires_at": 0}  # 过期时间戳

# 当前的token
nowTokenJky = "B698CA4401A81DD0E310AC62180EF579"


def getHeaders(userToken1):
    header = {
        "accept": "*/*",
        "accept-encoding": "gzip, deflate, br",
        "accept-language": "zh-CN,zh;q=0.9",
        "ati": "6752360107819",
        "authorization": "Bearer " + userToken1,
        "content-length": "495",
        "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
        "cookie": "_ati=6752360107819; 3AB9D23F7A4B3C9B=6L3M7UIJZOOGADJ3HXXKLVDTBCZO7WD57WSG6RQZVLP56WZOXU4L2Q5AL75DBR25YV2OIGMUAKY6H2EY6ODOUGFE4Q; group=g003; canaryFlag=null; canaries=null; 3AB9D23F7A4B3CSS=jdd036L3M7UIJZOOGADJ3HXXKLVDTBCZO7WD57WSG6RQZVLP56WZOXU4L2Q5AL75DBR25YV2OIGMUAKY6H2EY6ODOUGFE4QAAAAMV5HUO2KQAAAAADC7DCQS6OCYO6MX; token=7948BC8EF1CAD5E97CAB61ECE245973D",
        "module_code": "mainframe",
        "origin": "https://web.jackyun.com",
        "referer": "https://web.jackyun.com/home/mainframe_web.html",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "Windows",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-origin",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36",
        "x-requested-with": "XMLHttpRequest",
    }
    return header


# 数据库配置

# 去掉连锁后的渠道ID，
shopId = "2196547704831476736,2196472596733494272,1900063326934532992,1143418968494670080,1101949325263504512,1414596840864875264,1083109264100426624,1086958714925515392,1219614629365252736,1977100255194121344,1800057316234789632,1926812876169611264,1579689381010276864,2210264775810811520,2210264381479126656,2210263953282238208,2210261840647487744,2209677764108420608,2209677060889019264,2209454970934330880,2208734369617348352,2208729100531729792,2208728713780954880,2208728467770246912,2208728175098103552,2208727822812120832,2204356398997735168,2203806156512364416,2203652395374544768,2202953621054587648,2200931928813797632,2200930232903303808,2200182178518860672,2193691560617771904,2193587915603216512,2185032747339022720,2183590935726850816,2182790239932975488,2182778287481357952,2182777842811865472,2181395521896384128,2180453050062538880,2180432194544993024,2177773842724619392,2175341148349825408,2174881101903726208,2174881102574814848,2174881103153628800,2174881093649335936,2174881096014923392,2174881096627291776,2174881097231271552,2174881097810085504,2174881098959324800,2174881099521361536,2174881100108564096,2174881100729321088,2174881101333300864,2174881090109343360,2174881090998535808,2174881091602515584,2174881092357490304,2174881093003413120,2174860079490041472,2174832741586994816,2171256263775520256,2171256022839265024,2171255747069772416,2168880568685365248,2168302412113021056,2166098787597943808,2166098445719209728,2166098146094909184,2166097790115940096,2163137267154945792,2162529795037266176,2153121513952576128,2148710166569060480,2145170469658985601,2144989905328342144,2122733042855642752,2118880635105118080,2117512826659866496,2117496761483461888,2116853259334125568,2113956753731127168,2112585661766567808,2112364836803184512,2111585790972560128,2108784274217763712,2108726517544421120,2108726518198732544,2108726519540909824,2108726520337827584,2108726520958584576,2108726509466191616,2108726510053394176,2108726510816757504,2108726511513011968,2108726512100214528,2108726512679028480,2108726513408837376,2108726514088314624,2108726515002672896,2108726515707315968,2108726516294518528,2108726516915275520,2108726508375672576,2105050697803040896,2104344765290939776,2103752472676599040,2103751849971451008,2103750734940898432,2103750308415735040,2103748889625298176,2103742136577754368,2103741030111021312,2103739924946420992,2103731020245141760,2103730172777629952,2103728032550127872,2103726689264501888,2103725823393433856,2103724231923501312,2103723680390251776,2103723048535131392,2103717919494931584,2103716926486120704,2103716106138978560,2103715316921960704,2103057624436901120,2101570176968099456,2100022967670802304,2098537459848480640,2094457208749361664,2094312497391501952,2094295192214637056,2092179397060461056,2091452220091597824,2089194434358805504,2086955279994226944,2083501665192576384,2083501324766478720,2083499867228669312,2083498091392959616,2083497556006831232,2083497208333534592,2083463103238800512,2082119027792971264,2082107936962676224,2078511718047023744,2078511472706388608,2078511175531561600,2078510875180074240,2078510495998215424,2078510172114060544,2078509568861471360,2078509186399666816,2078508815841297024,2078508533010006656,2078508187780449536,2078507483981021824,2078507112281801344,2078506558318511360,2078460833363264128,2078252934350832896,2076179465309585792,2073951852469027584,2073891386114869248,2071950667345495296,2071942653148464512,2071189193307783808,2068137947819084160,2068136692608730496,2064943325541893632,2058143401155363840,2050806952688421120,2050221104687284992,2049980462457358592,2043617314778023168,2037830584998101376,2036935729903174528,2036318429155492608,2026787623177946368,2026306506570204032,2023971525086086784,2021880450899641728,2018117789249602432,2017836838728663936,2015235392111804672,2015232436320666880,2012824299193109120,2012821672989360640,2005409470043029888,2005399677387997824,2005033103704065920,2002124796371732224,1988543689976512896,1986448812687557760,1986446009156043904,1986444135510115456,1970328742546702592,1967396796225095040,1967395890314151296,1966736339793413504,1966721846391735424,1964565695475942912,1961032214540125568,1960867993905662080,1957246104458429440,1926967658585916288,1916596105592505728,1915995400023442688,1908878596202988928,1910079785883861888,1901400835804169216,1895704827962196224,1878930379750834432,1858676755176621312,1855138128719348096,1849447833779602304,1829804197811586176,1811056171992252928,1809384805940003456,1800059267879993728,1793567039270683520,1693406127751168512,1687807540230095232,1612402885736464768,1600002406283903616,1573979385258770688,1549315538513659008,2208998159009253120,2204494509763266304,2203622277527765504,2202413764811588608,2200807933904879872,2200768132633494144,2199314377791636608,2198755863037903232,2198742322155258240,2196536607073174528,2195800648178271232,2194319266485798656,2194311373434782720,2194237544012317696,2193673207146152576,2193671133476488064,2193452640686113408,2192771934993581056,2191341531515388928,2191360233283191296,2169595653540807680,2190667358882563072,2189137873580492288,2188534232277485184,2188391764690012032,2187892022787835008,2187718962985010560,2187689943376987264,2186995594263068928,2185594659263545600,2179182304206652416,2184352013903365760,2182020779208411264,2180494427385398784,2170477703902791040,2175431386033096064,2175346451639764736,2170433603996222080,2173204274144805120,2171278463604785792,2170283927013754624,2169589266423613824,2168316287873516928,2167682121687008640,2161153492702528000,2154507393965720064,2158905670754436352,2157411032159814400,2155360891726364928,2153739127159162112,2152531935483561472,2150730606764557696,2121103446570861312,2133534067615138432,2034133175847879680,2132705685315420416,2132038953308325760,2128983770918716160,2127560398379844736,2125486380426461824,2124671750101958912,2125447991353311872,2125374383376893952,2125342564829496704,2125316641740686720,2121102908614771200,2123633319370491008,2122513269664319104,2122437568328763136,2121663364159374080,2121207704296163200,2121190566065800448,2121100890827391488,2120593058829861632,2120359605398996864,2119587063505552640,2111814573343081600,2117589404840002816,2117395753851880704,2115921767782286720,2115395733005665664,2113791986405016064,2113764728008213760,2113453585226138880,2113401905486923648,2109867167575671936,2112287060667859200,2111937477198676224,2111758088032945536,2111709988416979712,2111667649736672000,2111667614537122560,2111667603733939584,2111667592039826176,2111667594932945664,2111667586394292992,2111667586485617408,2111667586763785600,2111667579112981248,2111667579239204224,2111033427803144960,2110830307475096320,2109158586654982528,2109168691723437312,2108706474678223488,2108674986360373888,2107523767570793088,2102350017692664576,2106583272644216960,2105852424288634240,2105071801924388736,2104377338805684096,2103033579724245248,2102185683714901632,2101644907300915072,2101644912535438720,2101644904121664896,2101635388931999104,2100877252106912256,2100322758658884096,2099270258197332736,2099220591732392704,2098751282110957440,2098043594377921280,2097293558477031552,2097276882394089600,2095278581017478528,2096626607321416960,2096493313576010752,2095707213258981760,2095019096619746304,2094336611997090432,2093511526791939072,2093475767626498816,2082782220254445824,2092042218161013760,2088527844065739648,2091361528078729728,2088447070083810816,2089186678235628800,2088446061571801984,2089098396402255104,2087890945001194240,2088375599342356224,2087720907593024256,2087078176197968512,2082782765611024896,2087100654996489600,2086977069688719616,2086432870135661696,2086204470015722112,2086200219265796224,2084190207629755008,2083511740737684224,2078443856982771200,2081983439554544896,2081971303422494208,2081844015344715008,2068330167132128896,2078450022827329024,2081142239102436224,2080684037445452672,2079891050845078912,2079891397084414592,2080506612820641280,2079880045210272256,2079842788147364352,2079234207288394496,2078940476582724864,2078266760289059072,2068256275783550720,2077550503536690176,2076964082483594496,2076304539746468992,2076100323613475712,2075481737603711744,2075386385445815040,2075343154090771584,2074726790230573824,2074671207180730752,2074149504329875840,2073407918313111936,2073408293661376896,2073984545147716352,2073980562772494336,2073870504337213440,2073868544874809344,2073497559322132864,2072698559333794432,2068865467267154304,2072461357549618048,2072478783400477568,2071907136028083200,2071169865262564352,2071108561747640960,2071108104751055488,2069086964584809344,2070388178165760640,2069873192796488320,2068899239755155328,2068193512590738048,2067007597410419456,2067007560803484800,2067007520889537280,2067007524338205824,2067007512122393472,2067007514228982528,2067007515435893632,2067007518062576384,2067007520024462208,2066825807747416576,2066036256715736960,2065938678607153024,2065899062521299456,2063856768678954880,2063766877232826240,2048014602595631744,2060859243639506432,2060803335638647296,2060389041513595392,2060233826649377024,2057315690125198464,2053758541910934528,2058641371558707456,2057913996769690496,2057445010636604160,2057441071413396224,2057365880541446528,2057266138885982208,2057169917885448576,2057169738976789248,2043447258464552192,2052920543082349568,2055734725760583936,2054992297601171840,2054992298255483264,2054301172757760256,2052286662433277568,2051507827231229312,2048085536816301312,2049328332560204544,2046677327242069376,2037736483091645184,2048624327913898880,2047330911431557888,2047098155796695040,2047048314789988352,2046441683644449024,2046441680414834944,2046308938948609280,2046308938956997888,2045047304224670976,2045025405544334208,2045025405552722816,2045025407800869760,2044942401216348672,2044953534052763520,2044863926485550336,2043053869668991232,1708816102065963392,2043040375403087104,2042915348895662976,2037086809343034368,2039251328073336192,2032596570589004032,2017450516572176768,2026922430136123776,2038380329260877056,2035073437818946176,2034757143847831808,2031292579459236864,2031849583978348928,2033310820154410240,2030775292473541376,2031319661182583808,2031315909507023872,2029168289892533376,2018223727748481664,2018898318532084608,2016626099303417984,2015891257929105920,2014694391565583616,2013136994741060096,2007917220977639680,2005779116930761216,2005887337501622528,2002169026327676800,2001383062137341312,2000880978232672896,1992209019762116224,1998519792402893056,1998490729917089664,1997786162221351552,1997784348784232192,1230498174662509184,1996492152192042752,1996492144298362624,1944161664144605824,1949445873177690880,1993562553997231104,1987871876967203072,1985871951226209280,1985687543891231744,1903148108963479936,1984260501345404160,1984206071881696128,1978350797099892992,1977470615556620544,1967429659201372800,1965935546563200128,1965270019846603520,1964665642349888000,1963876949099938304,1962198534409356800,1960803969769080192,1960093983143003904,1958050047543018624,1956156376889393408,1950822348546802048,1955112647551518592,1952960975295383424,1952825472274203648,1952272418251606272,1952171611401357568,1952171575766550784,1950587112344716032,1945212662536995712,1947211887850554880,1946568935663535232,1942182909710140288,1945731006390929024,1945008249999001216,1944795822790968320,1944167950080346368,1941636613432804736,1939943387681227008,1939935777165575552,1939345475119613184,1939997826520122752,1939935547430339072,1935776228846732416,1938643988303316480,1938584804157294080,1932574745462441984,1932574736587294720,1932574690107000576,1932489015785883392,1932488955110688512,1931840497889118080,1931840335628273536,1931839507613943680,1931239469753894528,1930322222864728832,1930322222873117440,1929593603890546944,1917491087293514368,1928953937038346624,1928204067321807744,1928197856044123008,1927489587022465024,1927420736264407424,1927420725157890432,1926995303207534848,1926877751575119872,1926769548447254528,1926769535461689344,1925475789074400512,1925246854290015488,1924717701182588160,1924525361579591040,1924525361730585984,1924525364976977280,1924525347345466624,1924525348712809728,1924525339074299136,1924525341356000512,1924525327877734912,1924525329091855616,1924525330635359488,1924525333823030528,1924034432734529408,1923980136907212672,1923910753445644544,1923910759779043584,1923910729388065024,1923910720872679680,1923910723742531840,1923910705034987776,1923910705043376384,1923910709111851264,1923874317099925760,1923874137567332224,1923874142743103360,1923874143068915968,1923874129707206528,1923874124790139136,1923872811100571904,1823878622417027968,1677557350139036928,1630423654964528000,2046348406425518336"
